package com.xyq.judge.controller;

import com.xyq.api.domain.dto.JudgeSubmitDTO;
import com.xyq.api.domain.vo.UserQuestionResultVO;
import com.xyq.common.core.constants.HttpConstants;
import com.xyq.common.core.domain.Result;
import com.xyq.judge.service.JudgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/judge")
public class JudgeController {

    @Autowired
    private JudgeService judgeService ;

    // 请求Judge判题方法            java代码
    @PostMapping("/doJudgeJavaCode")
  public   Result<UserQuestionResultVO> doJudgeJavaCode(@RequestBody JudgeSubmitDTO judgeSubmitDTO,
                                                        @RequestHeader(HttpConstants.AUTHENTICATION) String token){
     return Result.success(judgeService.doJudgeJavaCode(judgeSubmitDTO));
    }



}
